<?php
class Customer extends abstract_user implements interface_user {

    private $telephone;
    private $fax;
    private $newsletter;
    private $address_id;
    private $cart;
    private $wishlist;
    private $token;
    private $store_id;
    private $approved;

    public function login($email, $password, $override = false) {

        $password = sha1($this->salt . sha1($this->salt . sha1($password)));
        if($this->email == $email && $this->password == $password) {
           
            if ($override) { 
                return true;
            } elseif($this->approved){
                return true;
            }
        }
    
        return false;
    } 
    
    public function getCart() {
        return $this->cart;
    } 

    public function getWishlist() {
        return $this->wishlist;
    }
    public function getTelephone() {
        return $this->telephone;
    }

    public function getFax() {
        return $this->fax;
    }

    public function getNewsletter() {
        return $this->newsletter;	
    }

    public function getAddressId() {
        return $this->address_id;	
    }
}
?>
